package com.ruicar.afs.cloud.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruicar.afs.cloud.admin.entity.SysDepartment;

import java.util.List;


/**
 * 部门接口
 */
public interface SysDepartmentService extends IService<SysDepartment> {

	/**
	 * 通过父id获取 升序
	 *
	 * @param parentId
	 * @return
	 */
	List<SysDepartment> findByParentIdOrderBySortOrder(String parentId);

	/**
	 * 通过父id和状态获取
	 *
	 * @param parentId
	 * @param status
	 * @return
	 */
	List<SysDepartment> findByParentIdAndStatusOrderBySortOrder(String parentId, String status);

	/**
	 * 部门名模糊搜索 升序
	 *
	 * @param title
	 * @return
	 */
	List<SysDepartment> findByTitleLikeOrderBySortOrder(String title);


	List<SysDepartment> findAllSubByParentId(Long parentId);
}
